Ext.define('PJ.view.remindcontrol.List', {
    extend: 'AM.default.DefaultList',
    alias: ['widget.remindcontrolList'],
    requires: ['AM.default.DefaultSearchForm',
               'AM.default.jsonp.DefaultLoadJsonp'//jsonp加载数据
               ],
    initComponent: function(){
    	var me= this;
    	this.columns = [{
            header: '提醒类型',
            dataIndex: 'dataName',
            flex: 1,
            minWidth: 100,
            renderer: function(value, meta, record){
            	meta.tdAttr = "data-qtip='" + value + "'";
            	return value;
            }
        },{
            header: '提醒状态',
            dataIndex: 'activeState',
            flex: 1,
            minWidth: 100,
            renderer: function(value, meta, record){
            	if(value == 1){
            		return "开启";
            	}else if(value == 2){
            		return "关闭";
            	}
            }
        },{
            header: '短信状态',
            dataIndex: 'creator',
            flex: 1,
            minWidth: 100,
            renderer: function(value, meta, record){
            	if(value == 1){
            		return "开启";
            	}else if(value == 2){
            		return "关闭";
            	}
            }
        }];
    	
        this.store = Ext.create('PJ.'+ prototype +'.remindcontrol.List',{
        	isLoad: true
        });
        this.callParent(arguments);
        this.loadType = gj_onlineLearning_constant.loadType;//加载方式
    },
    /**
     * 开启
     */
    onOpenClick: function(){
    	  var me = this;
      	  var store = me.getStore();
      	  var records = me.getSelectionModel().getSelection();
	      for(var i=0;i<records.length;i++){
	    		 if(records[i].get("activeState") == 1){
	    			 Orchid.alert("提示","已开启的提醒不可再次开启！");
	    			 return;
	    		 }
	      }
	      	Ext.Msg.confirm({
	    		  title:'提示',
	    		  msg:'您确定要开启这些提醒吗?',
	    		  icon:Ext.Msg.WARNING,
	    		  buttons:Ext.Msg.OKCANCEL,
	    		  fn:function(id){
	    			  if(id=='ok'){
	    				  var dataIDs= new Array();
	    				  Ext.Array.each(records,function(name,index){
	    					  dataIDs.push(name.get('dataID'));
	    				  });
	    				  if(gj_onlineLearning_constant.loadType == "jsonp"){
	    					  var store1 = Ext.create('AM.default.jsonp.DefaultAjaxStore',{
	                      		loadType: gj_onlineLearning_constant.loadType,
	                              url: store.openUrl,
	                      		  extraParams: {
	                      			searchRemindState:1,
	                      			searchRemindTypeIDs: dataIDs
	                              }
	                      	});
	                      	store1.load(function(rec, operation, success){
	                      		if(success){
	                                  Ext.Msg.alert('消息', '开启成功！', function(){
	                                      var store = me.getStore();
//	                                      Ext.Ajax.request({
//	    									  url: showMsgUrl,
////	    									  url: 'workbench/orchid/data/msgData.jsons',
//	    									  params: {},
//	    									  success: function(response){
//												  var data = response.responseText;
//												  var jsonData = Ext.decode(data, true);
//												  var remindUserNoReadCount = jsonData.data.remindUserNoReadCount;
//												  var newsUserNoReadCount = jsonData.data.newsUserNoReadCount;
//												  /*me.setTitle("提醒管理("+remindUserNoReadCount+")")
//												  var tab = me.up("tabpanel").up("container").el.dom.firstChild.children[0].children[0].children[1].children[0].children;
//												  var tab = $("span.x-tab-inner");
//												  for(var i=0;i<tab.length;i++){
//													  if(tab[i].innerHTML.indexOf("提醒管理")!=-1){
//														  tab[i].innerHTML = "提醒管理("+remindUserNoReadCount+")";
//														  tab[i].innerText = "提醒管理("+remindUserNoReadCount+")";
//													  }else if(tab[i].innerHTML.indexOf("消息管理")!=-1){
//														  tab[i].innerHTML = "提醒管理("+newsUserNoReadCount+")";
//														  tab[i].innerText = "提醒管理("+newsUserNoReadCount+")";
//													  }
//												  }*/
//												  Ext.get("li_"+"8a10e7f9557b199401557b37dfbf0001").dom.innerHTML = '<span class="title"><b class="bull"></b>消息管理('+newsUserNoReadCount+')</span>'	
//												  Ext.get("li_"+"4028809c52207e8a015220860c5r0002").dom.innerHTML = '<span class="title"><b class="bull"></b>提醒管理('+remindUserNoReadCount+')</span>'	
//											  }
//	    								  });
	                                      store.load();
	                                  });
	                              }else{
	                                  Ext.Msg.alert('消息', operation.error);
	                              }
	                      	});
	    				  }else{
	    					  Ext.Ajax.request({
	    						  url:store.openUrl,
	    						  params: {
		                      			searchRemindState:1,
		                      			searchRemindTypeIDs: dataIDs
		                          },
	    						  success:function(response){
	    							  var data=response.responseText;
	    							  var json=Ext.decode(data,true);
	    							  if(json.success){
	    								  Orchid.alert('提示','开启成功!',function(){
//	    									  Ext.Ajax.request({
//	    										  url: showMsgUrl,
////	    										  url: 'workbench/orchid/data/msgData.jsons',
//	    										  params: {},
//	    										  success: function(response){
//	    											  var data = response.responseText;
//	    											  var jsonData = Ext.decode(data, true);
//	    											  var remindUserNoReadCount = jsonData.data.remindUserNoReadCount;
//	    											  var newsUserNoReadCount = jsonData.data.newsUserNoReadCount;
//	    											  /* me.setTitle("提醒管理("+remindUserNoReadCount+")")
//	    											  var tab = me.up("tabpanel").up("container").el.dom.firstChild.children[0].children[0].children[1].children[0].children;
//	    											  var tab = $("span.x-tab-inner");
//	    											  for(var i=0;i<tab.length;i++){
//	    												  if(tab[i].innerHTML.indexOf("提醒管理")!=-1){
//	    													  tab[i].innerHTML = "提醒管理("+remindUserNoReadCount+")";
//	    													  tab[i].innerText = "提醒管理("+remindUserNoReadCount+")";
//	    												  }else if(tab[i].innerHTML.indexOf("消息管理")!=-1){
//	    													  tab[i].innerHTML = "消息管理("+newsUserNoReadCount+")";
//	    													  tab[i].innerText = "消息管理("+newsUserNoReadCount+")";
//	    												  }
//	    											  }*/
//	    											  Ext.get("li_"+"8a10e7f9557b199401557b37dfbf0001").dom.innerHTML = '<span class="title"><b class="bull"></b>消息管理('+newsUserNoReadCount+')</span>'	
//	    											  Ext.get("li_"+"4028809c52207e8a015220860c5r0002").dom.innerHTML = '<span class="title"><b class="bull"></b>提醒管理('+remindUserNoReadCount+')</span>'	
//	    										  }
//	    									  });
	    									  store.load();
	    								  });
	    							  }else{
	    								  Orchid.alert('提示',json.msg);
	    							  }
	    						  }
	    					  });
	    				  }
	    			  }
	    		  }
	    	  });
    	},
    /**
     * 关闭
     */
    onShutDownClick: function(){
  	  var me = this;
  	  var store = me.getStore();
  	  var records = me.getSelectionModel().getSelection();
  	  for(var i=0;i<records.length;i++){
  		  if(records[i].get("activeState") == 2){
  			  Orchid.alert("提示","已关闭的提醒不可再次关闭！");
  			  return;
  		  }
  	  }
      	Ext.Msg.confirm({
    		  title:'提示',
    		  msg:'您确定要关闭这些提醒吗?',
    		  icon:Ext.Msg.WARNING,
    		  buttons:Ext.Msg.OKCANCEL,
    		  fn:function(id){
    			  if(id=='ok'){
    				  var dataIDs= new Array();
    				  Ext.Array.each(records,function(name,index){
    					  dataIDs.push(name.get('dataID'));
    				  });
    				  if(gj_onlineLearning_constant.loadType == "jsonp"){
    					  var store1 = Ext.create('AM.default.jsonp.DefaultAjaxStore',{
                      		loadType: gj_onlineLearning_constant.loadType,
                              url: store.shutDownUrl,
                      		  extraParams: {
	                      			searchRemindState:2,
	                      			searchRemindTypeIDs: dataIDs
	                          }
                      	});
                      	store1.load(function(rec, operation, success){
                      		if(success){
                                  Ext.Msg.alert('消息', '关闭成功！', function(){
                                      var store = me.getStore();
//                                      Ext.Ajax.request({
//    									  url: showMsgUrl,
////    									  url: 'workbench/orchid/data/msgData.jsons',
//    									  params: {},
//    									  success: function(response){
//											  var data = response.responseText;
//											  var jsonData = Ext.decode(data, true);
//											  var remindUserNoReadCount = jsonData.data.remindUserNoReadCount;
//											  var newsUserNoReadCount = jsonData.data.newsUserNoReadCount;
//											  /*me.up("tabpanel").up("container")
//											  me.setTitle("提醒管理("+remindUserNoReadCount+")")
//											  var tab = me.up("tabpanel").up("container").el.dom.firstChild.children[0].children[0].children[1].children[0].children;
//											  var tab = $("span.x-tab-inner");
//											  for(var i=0;i<tab.length;i++){
//												  if(tab[i].innerHTML.indexOf("提醒管理")!=-1){
//													  tab[i].innerHTML = "提醒管理("+remindUserNoReadCount+")";
//													  tab[i].innerText = "提醒管理("+remindUserNoReadCount+")";
//												  }else if(tab[i].innerHTML.indexOf("消息管理")!=-1){
//													  tab[i].innerHTML = "提醒管理("+newsUserNoReadCount+")";
//													  tab[i].innerText = "提醒管理("+newsUserNoReadCount+")";
//												  }
//											  }*/
//											  Ext.get("li_"+"8a10e7f9557b199401557b37dfbf0001").dom.innerHTML = '<span class="title"><b class="bull"></b>消息管理('+newsUserNoReadCount+')</span>'	
//											  Ext.get("li_"+"4028809c52207e8a015220860c5r0002").dom.innerHTML = '<span class="title"><b class="bull"></b>提醒管理('+remindUserNoReadCount+')</span>'	
//										  }
//    								  });
                                      store.load();
                                  });
                              }else{
                                  Ext.Msg.alert('消息', operation.error);
                              }
                      	});
    				  }else{
    					  Ext.Ajax.request({
    						  url:store.shutDownUrl,
    						  params: {
    							  searchRemindState:2,
    							  searchRemindTypeIDs: dataIDs
    						  },
    						  success:function(response){
    							  var data=response.responseText;
    							  var json=Ext.decode(data,true);
    							  if(json.success){
    								  Orchid.alert('提示','关闭成功!',function(){
//    									  Ext.Ajax.request({
//    										  url: showMsgUrl,
////    										  url: 'workbench/orchid/data/msgData.jsons',
//    										  params: {},
//    										  success: function(response){
//    											  var data = response.responseText;
//    											  var jsonData = Ext.decode(data, true);
//    											  var remindUserNoReadCount = jsonData.data.remindUserNoReadCount;
//    											  var newsUserNoReadCount = jsonData.data.newsUserNoReadCount;
//    											  /*me.up("tabpanel").up("container")
//    											  me.setTitle("提醒管理("+remindUserNoReadCount+")")
//    											  var tab = me.up("tabpanel").up("container").el.dom.firstChild.children[0].children[0].children[1].children[0].children;
//    											  var tab = $("span.x-tab-inner");
//    											  for(var i=0;i<tab.length;i++){
//    												  if(tab[i].innerHTML.indexOf("提醒管理")!=-1){
//    													  tab[i].innerHTML = "提醒管理("+remindUserNoReadCount+")";
//    													  tab[i].innerText = "提醒管理("+remindUserNoReadCount+")";
//    												  }else if(tab[i].innerHTML.indexOf("消息管理")!=-1){
//    													  tab[i].innerHTML = "消息管理("+newsUserNoReadCount+")";
//    													  tab[i].innerText = "消息管理("+newsUserNoReadCount+")";
//    												  }
//    											  }*/
//    											  Ext.get("li_"+"8a10e7f9557b199401557b37dfbf0001").dom.innerHTML = '<span class="title"><b class="bull"></b>消息管理('+newsUserNoReadCount+')</span>'	
//    											  Ext.get("li_"+"4028809c52207e8a015220860c5r0002").dom.innerHTML = '<span class="title"><b class="bull"></b>提醒管理('+remindUserNoReadCount+')</span>'	
//    										  }
//    									  });
    									  store.load();
    								  });
    							  }else{
    								  Orchid.alert('提示',json.msg);
    							  }
    						  }
    					  });
    				  }
    			  }
    		  }
    	  });
	},/**
     * 开启SMS
     */
    onOpenSMSClick: function(){
    	  var me = this;
      	  var store = me.getStore();
      	  var records = me.getSelectionModel().getSelection();
      	  for(var i=0;i<records.length;i++){
      		  if(records[i].get("activeState") == 2){
      			  Orchid.alert("提示","已关闭的提醒不可开启短信信息发送！");
      			  return;
      		  }
      	  }
	      for(var i=0;i<records.length;i++){
	    		 if(records[i].get("creator") == 1){
	    			 Orchid.alert("提示","已开启的信息发送不可再次开启！");
	    			 return;
	    		 }
	      }
	      	Ext.Msg.confirm({
	    		  title:'提示',
	    		  msg:'您确定要开启这些提醒吗?',
	    		  icon:Ext.Msg.WARNING,
	    		  buttons:Ext.Msg.OKCANCEL,
	    		  fn:function(id){
	    			  if(id=='ok'){
	    				  var dataIDs= new Array();
	    				  Ext.Array.each(records,function(name,index){
	    					  dataIDs.push(name.get('dataID'));
	    				  });
	    				  if(gj_onlineLearning_constant.loadType == "jsonp"){
	    					  var store1 = Ext.create('AM.default.jsonp.DefaultAjaxStore',{
	                      		loadType: gj_onlineLearning_constant.loadType,
	                              url: store.openSMSUrl,
	                      		  extraParams: {
	                      			searchRemindState:1,
	                      			searchRemindTypeIDs: dataIDs
	                              }
	                      	});
	                      	store1.load(function(rec, operation, success){
	                      		if(success){
	                                  Ext.Msg.alert('消息', '开启成功！', function(){
	                                      var store = me.getStore();
//	                                      Ext.Ajax.request({
//	    									  url: showMsgUrl,
////	    									  url: 'workbench/orchid/data/msgData.jsons',
//	    									  params: {},
//	    									  success: function(response){
//												  var data = response.responseText;
//												  var jsonData = Ext.decode(data, true);
//												  var remindUserNoReadCount = jsonData.data.remindUserNoReadCount;
//												  var newsUserNoReadCount = jsonData.data.newsUserNoReadCount;
//												  /*me.setTitle("提醒管理("+remindUserNoReadCount+")")
//												  var tab = me.up("tabpanel").up("container").el.dom.firstChild.children[0].children[0].children[1].children[0].children;
//												  var tab = $("span.x-tab-inner");
//												  for(var i=0;i<tab.length;i++){
//													  if(tab[i].innerHTML.indexOf("提醒管理")!=-1){
//														  tab[i].innerHTML = "提醒管理("+remindUserNoReadCount+")";
//														  tab[i].innerText = "提醒管理("+remindUserNoReadCount+")";
//													  }else if(tab[i].innerHTML.indexOf("消息管理")!=-1){
//														  tab[i].innerHTML = "提醒管理("+newsUserNoReadCount+")";
//														  tab[i].innerText = "提醒管理("+newsUserNoReadCount+")";
//													  }
//												  }*/
//												  Ext.get("li_"+"8a10e7f9557b199401557b37dfbf0001").dom.innerHTML = '<span class="title"><b class="bull"></b>消息管理('+newsUserNoReadCount+')</span>'	
//												  Ext.get("li_"+"4028809c52207e8a015220860c5r0002").dom.innerHTML = '<span class="title"><b class="bull"></b>提醒管理('+remindUserNoReadCount+')</span>'	
//											  }
//	    								  });
	                                      store.load();
	                                  });
	                              }else{
	                                  Ext.Msg.alert('消息', operation.error);
	                              }
	                      	});
	    				  }else{
	    					  Ext.Ajax.request({
	    						  url:store.openSMSUrl,
	    						  params: {
		                      			searchRemindState:1,
		                      			searchRemindTypeIDs: dataIDs
		                          },
	    						  success:function(response){
	    							  var data=response.responseText;
	    							  var json=Ext.decode(data,true);
	    							  if(json.success){
	    								  Orchid.alert('提示','开启成功!',function(){
//	    									  Ext.Ajax.request({
//	    										  url: showMsgUrl,
////	    										  url: 'workbench/orchid/data/msgData.jsons',
//	    										  params: {},
//	    										  success: function(response){
//	    											  var data = response.responseText;
//	    											  var jsonData = Ext.decode(data, true);
//	    											  var remindUserNoReadCount = jsonData.data.remindUserNoReadCount;
//	    											  var newsUserNoReadCount = jsonData.data.newsUserNoReadCount;
//	    											  /* me.setTitle("提醒管理("+remindUserNoReadCount+")")
//	    											  var tab = me.up("tabpanel").up("container").el.dom.firstChild.children[0].children[0].children[1].children[0].children;
//	    											  var tab = $("span.x-tab-inner");
//	    											  for(var i=0;i<tab.length;i++){
//	    												  if(tab[i].innerHTML.indexOf("提醒管理")!=-1){
//	    													  tab[i].innerHTML = "提醒管理("+remindUserNoReadCount+")";
//	    													  tab[i].innerText = "提醒管理("+remindUserNoReadCount+")";
//	    												  }else if(tab[i].innerHTML.indexOf("消息管理")!=-1){
//	    													  tab[i].innerHTML = "消息管理("+newsUserNoReadCount+")";
//	    													  tab[i].innerText = "消息管理("+newsUserNoReadCount+")";
//	    												  }
//	    											  }*/
//	    											  Ext.get("li_"+"8a10e7f9557b199401557b37dfbf0001").dom.innerHTML = '<span class="title"><b class="bull"></b>消息管理('+newsUserNoReadCount+')</span>'	
//	    											  Ext.get("li_"+"4028809c52207e8a015220860c5r0002").dom.innerHTML = '<span class="title"><b class="bull"></b>提醒管理('+remindUserNoReadCount+')</span>'	
//	    										  }
//	    									  });
	    									  store.load();
	    								  });
	    							  }else{
	    								  Orchid.alert('提示',json.msg);
	    							  }
	    						  }
	    					  });
	    				  }
	    			  }
	    		  }
	    	  });
    	},
    /**
     * 关闭SMS
     */
    onShutDownSMSClick: function(){
  	  var me = this;
  	  var store = me.getStore();
  	  var records = me.getSelectionModel().getSelection();
  	  for(var i=0;i<records.length;i++){
  		  if(records[i].get("creator") == 2){
  			  Orchid.alert("提示","已关闭的信息发送不可再次关闭！");
  			  return;
  		  }
  	  }
      	Ext.Msg.confirm({
    		  title:'提示',
    		  msg:'您确定要关闭这些提醒吗?',
    		  icon:Ext.Msg.WARNING,
    		  buttons:Ext.Msg.OKCANCEL,
    		  fn:function(id){
    			  if(id=='ok'){
    				  var dataIDs= new Array();
    				  Ext.Array.each(records,function(name,index){
    					  dataIDs.push(name.get('dataID'));
    				  });
    				  if(gj_onlineLearning_constant.loadType == "jsonp"){
    					  var store1 = Ext.create('AM.default.jsonp.DefaultAjaxStore',{
                      		loadType: gj_onlineLearning_constant.loadType,
                              url: store.shutDownSMSUrl,
                      		  extraParams: {
	                      			searchRemindState:2,
	                      			searchRemindTypeIDs: dataIDs
	                          }
                      	});
                      	store1.load(function(rec, operation, success){
                      		if(success){
                                  Ext.Msg.alert('消息', '关闭成功！', function(){
                                      var store = me.getStore();
//                                      Ext.Ajax.request({
//    									  url: showMsgUrl,
////    									  url: 'workbench/orchid/data/msgData.jsons',
//    									  params: {},
//    									  success: function(response){
//											  var data = response.responseText;
//											  var jsonData = Ext.decode(data, true);
//											  var remindUserNoReadCount = jsonData.data.remindUserNoReadCount;
//											  var newsUserNoReadCount = jsonData.data.newsUserNoReadCount;
//											  /*me.up("tabpanel").up("container")
//											  me.setTitle("提醒管理("+remindUserNoReadCount+")")
//											  var tab = me.up("tabpanel").up("container").el.dom.firstChild.children[0].children[0].children[1].children[0].children;
//											  var tab = $("span.x-tab-inner");
//											  for(var i=0;i<tab.length;i++){
//												  if(tab[i].innerHTML.indexOf("提醒管理")!=-1){
//													  tab[i].innerHTML = "提醒管理("+remindUserNoReadCount+")";
//													  tab[i].innerText = "提醒管理("+remindUserNoReadCount+")";
//												  }else if(tab[i].innerHTML.indexOf("消息管理")!=-1){
//													  tab[i].innerHTML = "提醒管理("+newsUserNoReadCount+")";
//													  tab[i].innerText = "提醒管理("+newsUserNoReadCount+")";
//												  }
//											  }*/
//											  Ext.get("li_"+"8a10e7f9557b199401557b37dfbf0001").dom.innerHTML = '<span class="title"><b class="bull"></b>消息管理('+newsUserNoReadCount+')</span>'	
//											  Ext.get("li_"+"4028809c52207e8a015220860c5r0002").dom.innerHTML = '<span class="title"><b class="bull"></b>提醒管理('+remindUserNoReadCount+')</span>'	
//										  }
//    								  });
                                      store.load();
                                  });
                              }else{
                                  Ext.Msg.alert('消息', operation.error);
                              }
                      	});
    				  }else{
    					  Ext.Ajax.request({
    						  url:store.shutDownSMSUrl,
    						  params: {
    							  searchRemindState:2,
    							  searchRemindTypeIDs: dataIDs
    						  },
    						  success:function(response){
    							  var data=response.responseText;
    							  var json=Ext.decode(data,true);
    							  if(json.success){
    								  Orchid.alert('提示','关闭成功!',function(){
//    									  Ext.Ajax.request({
//    										  url: showMsgUrl,
////    										  url: 'workbench/orchid/data/msgData.jsons',
//    										  params: {},
//    										  success: function(response){
//    											  var data = response.responseText;
//    											  var jsonData = Ext.decode(data, true);
//    											  var remindUserNoReadCount = jsonData.data.remindUserNoReadCount;
//    											  var newsUserNoReadCount = jsonData.data.newsUserNoReadCount;
//    											  /*me.up("tabpanel").up("container")
//    											  me.setTitle("提醒管理("+remindUserNoReadCount+")")
//    											  var tab = me.up("tabpanel").up("container").el.dom.firstChild.children[0].children[0].children[1].children[0].children;
//    											  var tab = $("span.x-tab-inner");
//    											  for(var i=0;i<tab.length;i++){
//    												  if(tab[i].innerHTML.indexOf("提醒管理")!=-1){
//    													  tab[i].innerHTML = "提醒管理("+remindUserNoReadCount+")";
//    													  tab[i].innerText = "提醒管理("+remindUserNoReadCount+")";
//    												  }else if(tab[i].innerHTML.indexOf("消息管理")!=-1){
//    													  tab[i].innerHTML = "消息管理("+newsUserNoReadCount+")";
//    													  tab[i].innerText = "消息管理("+newsUserNoReadCount+")";
//    												  }
//    											  }*/
//    											  Ext.get("li_"+"8a10e7f9557b199401557b37dfbf0001").dom.innerHTML = '<span class="title"><b class="bull"></b>消息管理('+newsUserNoReadCount+')</span>'	
//    											  Ext.get("li_"+"4028809c52207e8a015220860c5r0002").dom.innerHTML = '<span class="title"><b class="bull"></b>提醒管理('+remindUserNoReadCount+')</span>'	
//    										  }
//    									  });
    									  store.load();
    								  });
    							  }else{
    								  Orchid.alert('提示',json.msg);
    							  }
    						  }
    					  });
    				  }
    			  }
    		  }
    	  });
	},
    listeners: {
    	//点击列表数据时显示按钮事件
    	selectionchange: function(selModel, selected){
    		this.down('#' + this.oldId + "Open").setDisabled(selected.length === 0);//开启
    		this.down('#' + this.oldId + "ShutDown").setDisabled(selected.length === 0);//关闭
    		this.down('#' + this.oldId + "OpenSMS").setDisabled(selected.length === 0);//开启
    		this.down('#' + this.oldId + "ShutDownSMS").setDisabled(selected.length === 0);//关闭
    	},
		viewready: function(){
			var me = this;
			this.addDocked([{
				dock: 'top',
				xtype: "searchform",
				columnCount: 3,
				fieldDefaults: {
					labelAlign: 'right',
					labelWidth: 100
				},
				items: [{
                	xtype:"combo",
                    fieldLabel: "提醒类型",
                    name: "searchRemindType",
                	store: Ext.create("Ext.data.ArrayStore", {
                		singleton: true,
                		fields: [{
                			name: 'value',
                			mapping: "dataCode",
                			type: 'string'
                		}, {
                			name: 'text',
                			mapping: "dataName",
                			type: 'string'
                		}],
                		proxy: {
                			type: gj_onlineLearning_constant.loadType,
                			url: me.store.remindTypeUrl + '?typeCode=txlb',
                			reader: Ext.create('Ext.data.reader.Json', {
                				type: 'json',
                				root: 'data',
                				successProperty: 'success'
                			})
                		},
                		autoLoad: true
                	}),
        			valueField: 'value',
        			displayField: 'text',
        			editable: false,
        			defaultActive: false
                },{
					xtype: "combo",
					fieldLabel: '提醒状态',
					name: "searchRemindState",
					store: Ext.create("Ext.data.ArrayStore", {
						fields: ['value', 'text'],
						data: [[1, '开启'],[2,'关闭']]
					}),
					valueField: 'value',
					displayField: 'text',
					editable: false,
					emptyText: "请选择"
				}],
				grid: this
			},{
				xtype: 'toolbar',
				dock: 'top',
				displayInfo: true,
				items: [{
					text: '提醒开启',
					iconCls: 'reuseIco',
					itemId: this.oldId + "Open",
					disabled: true,
					scope: this,
					handler: this.onOpenClick
				},'-',{
					text: '提醒关闭',
					iconCls: 'discardIco',
					itemId: this.oldId + "ShutDown",
					disabled: true,
					scope: this,
					handler: this.onShutDownClick
				},"-",{
					text: '短信开启',
					iconCls: 'reuseIco',
					itemId: this.oldId + "OpenSMS",
					disabled: true,
					scope: this,
					handler: this.onOpenSMSClick
				},'-',{
					text: '短信关闭',
					iconCls: 'discardIco',
					itemId: this.oldId + "ShutDownSMS",
					disabled: true,
					scope: this,
					handler: this.onShutDownSMSClick
				},"->", this.countSelectPanel]
			}]);
		}
    }
});
